from django.contrib import admin

from . import models


class AdditionalDataHumanInline(admin.StackedInline):
    model = models.AdditionalDataHuman
    fk_name = 'human'


class PlaceOfResidenceInline(admin.StackedInline):
    model = models.PlaceOfResidence
    fk_name = 'owner'


@admin.register(models.Human)
class HumanAdmin(admin.ModelAdmin):

    list_display = ('name', 'surname')
    inlines = [AdditionalDataHumanInline, PlaceOfResidenceInline]

    class Meta:
        fields = ('name', 'surname')
